From 02f9d511779a979e1616fbf49ca6850ab037c21b Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 9 Mar 2012 12:36:11 -0500 Subject: [PATCH] gdk: clean up logic error Fallout from previous query_state() cleanups. --- gdk/x11/gdkdevice-core-x11.c | 18 ++++++++---------- gdk/x11/gdkdevice-xi2.c | 24 +++++++++++------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/gdk/x11/gdkdevice-core-x11.c b/gdk/x11/gdkdevice-core-x11.c index 51cacb8ce6..57a1975ddf 100644 --- a/gdk/x11/gdkdevice-core-x11.c +++ b/gdk/x11/gdkdevice-core-x11.c @@ -255,16 +255,14 @@ gdk_x11_device_core_query_state (GdkDevice *device, display = gdk_window_get_display (window); default_screen = gdk_display_get_default_screen (display); - if (GDK_X11_DISPLAY (display)->trusted_client && - XQueryPointer (GDK_WINDOW_XDISPLAY (window), - GDK_WINDOW_XID (window), - &xroot_window, - &xchild_window, - &xroot_x, &xroot_y, - &xwin_x, &xwin_y, - &xmask)) - return; - else + if (!GDK_X11_DISPLAY (display)->trusted_client || + !XQueryPointer (GDK_WINDOW_XDISPLAY (window), + GDK_WINDOW_XID (window), + &xroot_window, + &xchild_window, + &xroot_x, &xroot_y, + &xwin_x, &xwin_y, + &xmask)) { XSetWindowAttributes attributes; Display *xdisplay; diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index dc13f83379..ef7e166f9c 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -329,19 +329,17 @@ gdk_x11_device_xi2_query_state (GdkDevice *device, display = gdk_window_get_display (window); default_screen = gdk_display_get_default_screen (display); - if (GDK_X11_DISPLAY (display)->trusted_client && - XIQueryPointer (GDK_WINDOW_XDISPLAY (window), - device_xi2->device_id, - GDK_WINDOW_XID (window), - &xroot_window, - &xchild_window, - &xroot_x, &xroot_y, - &xwin_x, &xwin_y, - &button_state, - &mod_state, - &group_state)) - return; - else + if (!GDK_X11_DISPLAY (display)->trusted_client || + !XIQueryPointer (GDK_WINDOW_XDISPLAY (window), + device_xi2->device_id, + GDK_WINDOW_XID (window), + &xroot_window, + &xchild_window, + &xroot_x, &xroot_y, + &xwin_x, &xwin_y, + &button_state, + &mod_state, + &group_state)) { XSetWindowAttributes attributes; Display *xdisplay; -- 2.30.2